using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._MappingClusters
{
    /// <summary>
    /// <para>Cluster and Outlier Analysis </para>
    /// <para>Given a set of weighted features, identifies statistically significant hot spots, cold spots, and spatial outliers using the Anselin Local Moran's I statistic.</para>
    /// <para>给定一组加权特征，使用 Anselin 局部 Moran's I 统计量识别具有统计显著性的热点、冷点和空间异常值。</para>
    /// </summary>    
    [DisplayName("Cluster and Outlier Analysis ")]
    public class ClustersOutliers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ClustersOutliers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Feature_Class">
        /// <para>Input Feature Class</para>
        /// <para>The feature class for which cluster and outlier analysis will be performed.</para>
        /// <para>将对其执行聚类和异常值分析的要素类。</para>
        /// </param>
        /// <param name="_Input_Field">
        /// <para>Input Field</para>
        /// <para>The numeric field to be evaluated.</para>
        /// <para>要计算的数值字段。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class to receive the results fields.</para>
        /// <para>用于接收结果字段的输出要素类。</para>
        /// </param>
        /// <param name="_Conceptualization_of_Spatial_Relationships">
        /// <para>Conceptualization of Spatial Relationships</para>
        /// <para><xdoc>
        ///   <para>Specifies how spatial relationships among features are defined.</para>
        ///   <bulletList>
        ///     <bullet_item>Inverse distance—Nearby neighboring features have a larger influence on the computations for a target feature than features that are far away.</bullet_item><para/>
        ///     <bullet_item>Inverse distance squared—Same as Inverse distance except that the slope is sharper, so influence drops off more quickly, and only a target feature's closest neighbors will exert substantial influence on computations for that feature.</bullet_item><para/>
        ///     <bullet_item>Fixed distance band—Each feature is analyzed within the context of neighboring features. Neighboring features inside the specified critical distance (Distance Band or Threshold Distance) receive a weight of one and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.</bullet_item><para/>
        ///     <bullet_item>Zone of indifference—Features within the specified critical distance (Distance Band or Threshold Distance) of a target feature receive a weight of one and influence computations for that feature. Once the critical distance is exceeded, weights (and the influence a neighboring feature has on target feature computations) diminish with distance.</bullet_item><para/>
        ///     <bullet_item>K nearest neighbors—The closest k features are included in the analysis. The number of neighbors (k) is specified by the Number of Neighbors parameter.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges only—Only neighboring polygon features that share a boundary or overlap will influence computations for the target polygon feature.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges corners—Polygon features that share a boundary, share a node, or overlap will influence computations for the target polygon feature.</bullet_item><para/>
        ///     <bullet_item>Get spatial weights from file—Spatial relationships are defined by a specified spatial weights file. The path to the spatial weights file is specified by the Weights Matrix File parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义要素之间的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>反距离 - 与远处的要素相比，邻近要素对目标要素的计算影响更大。</bullet_item><para/>
        ///     <bullet_item>反距离平方 - 与反距离相同，只是斜率更锐利，因此影响下降得更快，并且只有目标要素的最近邻域才会对该要素的计算产生重大影响。</bullet_item><para/>
        ///     <bullet_item>固定距离带 - 在相邻要素的上下文中分析每个要素。指定临界距离（距离带或阈值距离）内的相邻要素的权重为 1，并对目标要素的计算产生影响。临界距离之外的相邻要素的权重为零，并且对目标要素的计算没有影响。</bullet_item><para/>
        ///     <bullet_item>无差异区域 - 目标要素的指定临界距离（距离带或阈值距离）内的要素将获得权重 1 并影响该要素的计算。一旦超过临界距离，权重（以及相邻要素对目标要素计算的影响）会随着距离的增加而减小。</bullet_item><para/>
        ///     <bullet_item>K 最近邻 - 分析中包括最近 k 个要素。邻居数 （k） 由邻居数参数指定。</bullet_item><para/>
        ///     <bullet_item>仅限邻接边—只有共享边界或重叠的相邻面要素才会影响目标面要素的计算。</bullet_item><para/>
        ///     <bullet_item>邻接边角 - 共享边界、共享节点或重叠的面要素将影响目标面要素的计算。</bullet_item><para/>
        ///     <bullet_item>从文件中获取空间权重 - 空间关系由指定的空间权重文件定义。空间权重文件的路径由权重矩阵文件参数指定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_Distance_Method">
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how distances are calculated from each feature to neighboring features.</para>
        ///   <bulletList>
        ///     <bullet_item>Euclidean—The straight-line distance between two points (as the crow flies)</bullet_item><para/>
        ///     <bullet_item>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算从每个要素到相邻要素的距离。</para>
        ///   <bulletList>
        ///     <bullet_item>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</bullet_item><para/>
        ///     <bullet_item>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_Standardization">
        /// <para>Standardization</para>
        /// <para><xdoc>
        ///   <para>Row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No standardization of spatial weights is applied.</bullet_item><para/>
        ///     <bullet_item>Row—Spatial weights are standardized; each weight is divided by its row sum (the sum of the weights of all neighboring features).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每当要素的分布由于采样设计或强加的聚合方案而可能存在偏差时，建议进行行标准化。</para>
        ///   <bulletList>
        ///     <bullet_item>无 - 不应用空间权重的标准化。</bullet_item><para/>
        ///     <bullet_item>行 - 空间权重已标准化;每个权重除以其行总和（所有相邻要素的权重之和）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public ClustersOutliers(object _Input_Feature_Class, object _Input_Field, object _Output_Feature_Class, _Conceptualization_of_Spatial_Relationships_value _Conceptualization_of_Spatial_Relationships, _Distance_Method_value _Distance_Method, _Standardization_value _Standardization)
        {
            this._Input_Feature_Class = _Input_Feature_Class;
            this._Input_Field = _Input_Field;
            this._Output_Feature_Class = _Output_Feature_Class;
            this._Conceptualization_of_Spatial_Relationships = _Conceptualization_of_Spatial_Relationships;
            this._Distance_Method = _Distance_Method;
            this._Standardization = _Standardization;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Cluster and Outlier Analysis ";

        public override string CallName => "stats.ClustersOutliers";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "randomGenerator", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Feature_Class, _Input_Field, _Output_Feature_Class, _Conceptualization_of_Spatial_Relationships.GetGPValue(), _Distance_Method.GetGPValue(), _Standardization.GetGPValue(), _Distance_Band_or_Threshold_Distance, _Weights_Matrix_File, _Apply_False_Discovery_Rate__FDR__Correction.GetGPValue(), _Index_Field_Name, _ZScore_Field_Name, _Probability_Field, _Cluster_Outlier_Type, _Source_ID, _Number_of_Permutations, _number_of_neighbors];

        /// <summary>
        /// <para>Input Feature Class</para>
        /// <para>The feature class for which cluster and outlier analysis will be performed.</para>
        /// <para>将对其执行聚类和异常值分析的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Feature_Class { get; set; }


        /// <summary>
        /// <para>Input Field</para>
        /// <para>The numeric field to be evaluated.</para>
        /// <para>要计算的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class to receive the results fields.</para>
        /// <para>用于接收结果字段的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Conceptualization of Spatial Relationships</para>
        /// <para><xdoc>
        ///   <para>Specifies how spatial relationships among features are defined.</para>
        ///   <bulletList>
        ///     <bullet_item>Inverse distance—Nearby neighboring features have a larger influence on the computations for a target feature than features that are far away.</bullet_item><para/>
        ///     <bullet_item>Inverse distance squared—Same as Inverse distance except that the slope is sharper, so influence drops off more quickly, and only a target feature's closest neighbors will exert substantial influence on computations for that feature.</bullet_item><para/>
        ///     <bullet_item>Fixed distance band—Each feature is analyzed within the context of neighboring features. Neighboring features inside the specified critical distance (Distance Band or Threshold Distance) receive a weight of one and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.</bullet_item><para/>
        ///     <bullet_item>Zone of indifference—Features within the specified critical distance (Distance Band or Threshold Distance) of a target feature receive a weight of one and influence computations for that feature. Once the critical distance is exceeded, weights (and the influence a neighboring feature has on target feature computations) diminish with distance.</bullet_item><para/>
        ///     <bullet_item>K nearest neighbors—The closest k features are included in the analysis. The number of neighbors (k) is specified by the Number of Neighbors parameter.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges only—Only neighboring polygon features that share a boundary or overlap will influence computations for the target polygon feature.</bullet_item><para/>
        ///     <bullet_item>Contiguity edges corners—Polygon features that share a boundary, share a node, or overlap will influence computations for the target polygon feature.</bullet_item><para/>
        ///     <bullet_item>Get spatial weights from file—Spatial relationships are defined by a specified spatial weights file. The path to the spatial weights file is specified by the Weights Matrix File parameter.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何定义要素之间的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>反距离 - 与远处的要素相比，邻近要素对目标要素的计算影响更大。</bullet_item><para/>
        ///     <bullet_item>反距离平方 - 与反距离相同，只是斜率更锐利，因此影响下降得更快，并且只有目标要素的最近邻域才会对该要素的计算产生重大影响。</bullet_item><para/>
        ///     <bullet_item>固定距离带 - 在相邻要素的上下文中分析每个要素。指定临界距离（距离带或阈值距离）内的相邻要素的权重为 1，并对目标要素的计算产生影响。临界距离之外的相邻要素的权重为零，并且对目标要素的计算没有影响。</bullet_item><para/>
        ///     <bullet_item>无差异区域 - 目标要素的指定临界距离（距离带或阈值距离）内的要素将获得权重 1 并影响该要素的计算。一旦超过临界距离，权重（以及相邻要素对目标要素计算的影响）会随着距离的增加而减小。</bullet_item><para/>
        ///     <bullet_item>K 最近邻 - 分析中包括最近 k 个要素。邻居数 （k） 由邻居数参数指定。</bullet_item><para/>
        ///     <bullet_item>仅限邻接边—只有共享边界或重叠的相邻面要素才会影响目标面要素的计算。</bullet_item><para/>
        ///     <bullet_item>邻接边角 - 共享边界、共享节点或重叠的面要素将影响目标面要素的计算。</bullet_item><para/>
        ///     <bullet_item>从文件中获取空间权重 - 空间关系由指定的空间权重文件定义。空间权重文件的路径由权重矩阵文件参数指定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Conceptualization of Spatial Relationships")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Conceptualization_of_Spatial_Relationships_value _Conceptualization_of_Spatial_Relationships { get; set; }

        public enum _Conceptualization_of_Spatial_Relationships_value
        {
            /// <summary>
            /// <para>Inverse distance</para>
            /// <para>Inverse distance—Nearby neighboring features have a larger influence on the computations for a target feature than features that are far away.</para>
            /// <para>反距离 - 与远处的要素相比，邻近要素对目标要素的计算影响更大。</para>
            /// </summary>
            [Description("Inverse distance")]
            [GPEnumValue("INVERSE_DISTANCE")]
            _INVERSE_DISTANCE,

            /// <summary>
            /// <para>Inverse distance squared</para>
            /// <para>Inverse distance squared—Same as Inverse distance except that the slope is sharper, so influence drops off more quickly, and only a target feature's closest neighbors will exert substantial influence on computations for that feature.</para>
            /// <para>反距离平方 - 与反距离相同，只是斜率更锐利，因此影响下降得更快，并且只有目标要素的最近邻域才会对该要素的计算产生重大影响。</para>
            /// </summary>
            [Description("Inverse distance squared")]
            [GPEnumValue("INVERSE_DISTANCE_SQUARED")]
            _INVERSE_DISTANCE_SQUARED,

            /// <summary>
            /// <para>Fixed distance band</para>
            /// <para>Fixed distance band—Each feature is analyzed within the context of neighboring features. Neighboring features inside the specified critical distance (Distance Band or Threshold Distance) receive a weight of one and exert influence on computations for the target feature. Neighboring features outside the critical distance receive a weight of zero and have no influence on a target feature's computations.</para>
            /// <para>固定距离带 - 在相邻要素的上下文中分析每个要素。指定临界距离（距离带或阈值距离）内的相邻要素的权重为 1，并对目标要素的计算产生影响。临界距离之外的相邻要素的权重为零，并且对目标要素的计算没有影响。</para>
            /// </summary>
            [Description("Fixed distance band")]
            [GPEnumValue("FIXED_DISTANCE_BAND")]
            _FIXED_DISTANCE_BAND,

            /// <summary>
            /// <para>Zone of indifference</para>
            /// <para>Zone of indifference—Features within the specified critical distance (Distance Band or Threshold Distance) of a target feature receive a weight of one and influence computations for that feature. Once the critical distance is exceeded, weights (and the influence a neighboring feature has on target feature computations) diminish with distance.</para>
            /// <para>无差异区域 - 目标要素的指定临界距离（距离带或阈值距离）内的要素将获得权重 1 并影响该要素的计算。一旦超过临界距离，权重（以及相邻要素对目标要素计算的影响）会随着距离的增加而减小。</para>
            /// </summary>
            [Description("Zone of indifference")]
            [GPEnumValue("ZONE_OF_INDIFFERENCE")]
            _ZONE_OF_INDIFFERENCE,

            /// <summary>
            /// <para>K nearest neighbors</para>
            /// <para>K nearest neighbors—The closest k features are included in the analysis. The number of neighbors (k) is specified by the Number of Neighbors parameter.</para>
            /// <para>K 最近邻 - 分析中包括最近 k 个要素。邻居数 （k） 由邻居数参数指定。</para>
            /// </summary>
            [Description("K nearest neighbors")]
            [GPEnumValue("K_NEAREST_NEIGHBORS")]
            _K_NEAREST_NEIGHBORS,

            /// <summary>
            /// <para>Contiguity edges only</para>
            /// <para>Contiguity edges only—Only neighboring polygon features that share a boundary or overlap will influence computations for the target polygon feature.</para>
            /// <para>仅限邻接边—只有共享边界或重叠的相邻面要素才会影响目标面要素的计算。</para>
            /// </summary>
            [Description("Contiguity edges only")]
            [GPEnumValue("CONTIGUITY_EDGES_ONLY")]
            _CONTIGUITY_EDGES_ONLY,

            /// <summary>
            /// <para>Contiguity edges corners</para>
            /// <para>Contiguity edges corners—Polygon features that share a boundary, share a node, or overlap will influence computations for the target polygon feature.</para>
            /// <para>邻接边角 - 共享边界、共享节点或重叠的面要素将影响目标面要素的计算。</para>
            /// </summary>
            [Description("Contiguity edges corners")]
            [GPEnumValue("CONTIGUITY_EDGES_CORNERS")]
            _CONTIGUITY_EDGES_CORNERS,

            /// <summary>
            /// <para>Get spatial weights from file</para>
            /// <para>Get spatial weights from file—Spatial relationships are defined by a specified spatial weights file. The path to the spatial weights file is specified by the Weights Matrix File parameter.</para>
            /// <para>从文件中获取空间权重 - 空间关系由指定的空间权重文件定义。空间权重文件的路径由权重矩阵文件参数指定。</para>
            /// </summary>
            [Description("Get spatial weights from file")]
            [GPEnumValue("GET_SPATIAL_WEIGHTS_FROM_FILE")]
            _GET_SPATIAL_WEIGHTS_FROM_FILE,

        }

        /// <summary>
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how distances are calculated from each feature to neighboring features.</para>
        ///   <bulletList>
        ///     <bullet_item>Euclidean—The straight-line distance between two points (as the crow flies)</bullet_item><para/>
        ///     <bullet_item>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算从每个要素到相邻要素的距离。</para>
        ///   <bulletList>
        ///     <bullet_item>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</bullet_item><para/>
        ///     <bullet_item>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Distance_Method_value _Distance_Method { get; set; }

        public enum _Distance_Method_value
        {
            /// <summary>
            /// <para>Euclidean</para>
            /// <para>Euclidean—The straight-line distance between two points (as the crow flies)</para>
            /// <para>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</para>
            /// </summary>
            [Description("Euclidean")]
            [GPEnumValue("EUCLIDEAN_DISTANCE")]
            _EUCLIDEAN_DISTANCE,

            /// <summary>
            /// <para>Manhattan</para>
            /// <para>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</para>
            /// <para>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</para>
            /// </summary>
            [Description("Manhattan")]
            [GPEnumValue("MANHATTAN_DISTANCE")]
            _MANHATTAN_DISTANCE,

        }

        /// <summary>
        /// <para>Standardization</para>
        /// <para><xdoc>
        ///   <para>Row standardization is recommended whenever the distribution of your features is potentially biased due to sampling design or an imposed aggregation scheme.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No standardization of spatial weights is applied.</bullet_item><para/>
        ///     <bullet_item>Row—Spatial weights are standardized; each weight is divided by its row sum (the sum of the weights of all neighboring features).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>每当要素的分布由于采样设计或强加的聚合方案而可能存在偏差时，建议进行行标准化。</para>
        ///   <bulletList>
        ///     <bullet_item>无 - 不应用空间权重的标准化。</bullet_item><para/>
        ///     <bullet_item>行 - 空间权重已标准化;每个权重除以其行总和（所有相邻要素的权重之和）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Standardization")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Standardization_value _Standardization { get; set; }

        public enum _Standardization_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No standardization of spatial weights is applied.</para>
            /// <para>无 - 不应用空间权重的标准化。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Row</para>
            /// <para>Row—Spatial weights are standardized; each weight is divided by its row sum (the sum of the weights of all neighboring features).</para>
            /// <para>行 - 空间权重已标准化;每个权重除以其行总和（所有相邻要素的权重之和）。</para>
            /// </summary>
            [Description("Row")]
            [GPEnumValue("ROW")]
            _ROW,

        }

        /// <summary>
        /// <para>Distance Band or Threshold Distance</para>
        /// <para><xdoc>
        ///   <para>Specifies a cutoff distance for Inverse Distance and Fixed Distance options. Features outside the specified cutoff for a target feature are ignored in analyses for that feature. However, for Zone of Indifference, the influence of features outside the given distance is reduced with distance, while those inside the distance threshold are equally considered. The distance value entered should match that of the output coordinate system.</para>
        ///   <para>For the Inverse Distance conceptualizations of spatial relationships, a value of 0 indicates that no threshold distance is applied; when this parameter is left blank, a default threshold value is computed and applied. This default value is the Euclidean distance that ensures every feature has at least one neighbor.</para>
        ///   <para>This parameter has no effect when Polygon Contiguity or Get Spatial Weights From File spatial conceptualizations are selected.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定“反向距离”和“固定距离”选项的截止距离。在对目标要素的分析中，将忽略目标要素的指定截止值之外的特征。但是，对于无差异区域，给定距离之外的要素的影响会随着距离的增加而减小，而距离阈值内的要素则被同样考虑在内。输入的距离值应与输出坐标系的距离值匹配。</para>
        ///   <para>对于空间关系的“反距离”概念化，值为 0 表示未应用阈值距离;当此参数留空时，将计算并应用默认阈值。此默认值为欧几里得距离，用于确保每个要素至少有一个邻居。</para>
        ///   <para>选择“面连续性”或“从文件获取空间权重”空间概念化时，此参数无效。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Band or Threshold Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _Distance_Band_or_Threshold_Distance { get; set; } = null;


        /// <summary>
        /// <para>Weights Matrix File</para>
        /// <para>The path to a file containing weights that define spatial, and potentially temporal, relationships among features.</para>
        /// <para>包含权重的文件的路径，这些权重用于定义要素之间的空间关系和潜在的时间关系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weights Matrix File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Weights_Matrix_File { get; set; } = null;


        /// <summary>
        /// <para>Apply False Discovery Rate (FDR) Correction</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistical significance will be assessed with or without FDR correction.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistical significance will be based on the False Discovery Rate correction for a 95 percent confidence level.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Features with p-values less than 0.05 will appear in the COType field reflecting statistically significant clusters or outliers at a 95 percent confidence level. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在有或没有 FDR 校正的情况下评估统计显著性。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 统计显著性将基于 95% 置信水平的错误发现率校正。</bullet_item><para/>
        ///     <bullet_item>未选中 - p 值小于 0.05 的要素将显示在 COType 字段中，以 95% 的置信水平反映具有统计显著性的聚类或异常值。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Apply False Discovery Rate (FDR) Correction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Apply_False_Discovery_Rate__FDR__Correction_value _Apply_False_Discovery_Rate__FDR__Correction { get; set; } = _Apply_False_Discovery_Rate__FDR__Correction_value._false;

        public enum _Apply_False_Discovery_Rate__FDR__Correction_value
        {
            /// <summary>
            /// <para>APPLY_FDR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPLY_FDR")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_FDR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_FDR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Index Field Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Index Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Index_Field_Name { get; set; }


        /// <summary>
        /// <para>ZScore Field Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("ZScore Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _ZScore_Field_Name { get; set; }


        /// <summary>
        /// <para>Probability Field</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Probability Field")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Probability_Field { get; set; }


        /// <summary>
        /// <para>Cluster Outlier Type</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cluster Outlier Type")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Cluster_Outlier_Type { get; set; }


        /// <summary>
        /// <para>Source ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Source_ID { get; set; }


        /// <summary>
        /// <para>Number of Permutations</para>
        /// <para><xdoc>
        ///   <para>The number of random permutations for the calculation of pseudo p-values. The default number of permutations is 499. If you choose 0 permutations, the standard p-value is calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>0—Permutations are not used and a standard p-value is calculated.</bullet_item><para/>
        ///     <bullet_item>99—With 99 permutations, the smallest possible pseudo p-value is 0.01 and all other pseudo p-values will be multiples of this value.</bullet_item><para/>
        ///     <bullet_item>199—With 199 permutations, the smallest possible pseudo p-value is 0.005 and all other possible pseudo p-values will be multiples of this value.</bullet_item><para/>
        ///     <bullet_item>499—With 499 permutations, the smallest possible pseudo p-value is 0.002 and all other pseudo p-values will be multiples of this value.</bullet_item><para/>
        ///     <bullet_item>999—With 999 permutations, the smallest possible pseudo p-value is 0.001 and all other pseudo p-values will be multiples of this value.</bullet_item><para/>
        ///     <bullet_item>9999—With 9999 permutations, the smallest possible pseudo p-value is 0.0001 and all other pseudo p-values will be multiples of this value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于计算伪 p 值的随机排列数。默认排列数为 499。如果选择 0 种排列，则计算标准 p 值。</para>
        ///   <bulletList>
        ///     <bullet_item>0 - 不使用排列，并计算标准 p 值。</bullet_item><para/>
        ///     <bullet_item>99 - 对于 99 个排列，可能的最小伪 p 值为 0.01，所有其他伪 p 值将是该值的倍数。</bullet_item><para/>
        ///     <bullet_item>199 - 对于 199 个排列，最小可能的伪 p 值为 0.005，所有其他可能的伪 p 值都将是该值的倍数。</bullet_item><para/>
        ///     <bullet_item>499 - 对于 499 个排列，可能的最小伪 p 值为 0.002，所有其他伪 p 值都将是该值的倍数。</bullet_item><para/>
        ///     <bullet_item>999 - 对于 999 个排列，可能的最小伪 p 值为 0.001，所有其他伪 p 值将是该值的倍数。</bullet_item><para/>
        ///     <bullet_item>9999 - 对于 9999 排列，可能的最小伪 p 值为 0.0001，所有其他伪 p 值将是该值的倍数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Permutations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _Number_of_Permutations { get; set; } = 499;


        /// <summary>
        /// <para>Number of Neighbors</para>
        /// <para>The number of neighbors to include in the analysis.</para>
        /// <para>要包含在分析中的邻居数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Neighbors")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _number_of_neighbors { get; set; } = null;


        public ClustersOutliers SetEnv(object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object randomGenerator = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, randomGenerator: randomGenerator, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}